package com.mine.demo.entity;

// 草莓类
public class Strawberry extends Fruit {
    public Strawberry() {
        this.name = "草莓";
        this.price = 13;
    }

    @Override
    public double calculateTotalPrice(double weight) {
        // 添加促销活动
        return price * weight * 0.8;
    }
}